<script>
import Vue from 'vue'
export default {
	onLaunch: function() {
		// console.log('App Launch');

		setTimeout(() => {
			uni.setTabBarBadge({
				// index: 1,
				// text: '31'
			});
			uni.showTabBarRedDot({
				// index: 3
			});
		}, 1000);
	},
	onShow: function() {
		// console.log('App Show');
	},
	onHide: function() {
		// console.log('App Hide');
	},
    onLaunch: function() {
        uni.getSystemInfo({
            success:function(e){
                Vue.prototype.statusBar = e.statusBarHeight
                // #ifndef MP
                if(e.platform == 'android') {
                    Vue.prototype.customBar = e.statusBarHeight + 50
                }else {
                    Vue.prototype.customBar = e.statusBarHeight + 45
                }
                // #endif
                
                // #ifdef MP-WEIXIN
                let custom = wx.getMenuButtonBoundingClientRect()
                Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight + 4
                // #endif
                
                // #ifdef MP-ALIPAY
                Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
                // #endif
                Vue.prototype.scrollHeight = e.screenHeight - Vue.prototype.customBar - 97
                // console.info('高度' + Vue.prototype.customBar)
                // console.info('滚动高度' + Vue.prototype.scrollHeight)
            }
        })
    }
};
</script>

<style>
/*每个页面公共css */ 
</style>
